package com.tiancheng.trade.authserver.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tiancheng.trade.authserver.entity.AuthApplication;
import com.tiancheng.trade.authserver.entity.AuthRole;
import com.tiancheng.trade.authserver.entity.UserThirdInfo;
import com.tiancheng.trade.authserver.enums.ThirdPlatformEnums;
import com.tiancheng.trade.authserver.model.reponse.SubjectAllRoleResult;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @Author: likailun
 * @Description: 授权角色service
 * @Date: create in 2024/10/21 17:18
 */
public interface IAuthRoleService extends IService<AuthRole> {
    /**
     * 根据应用程序clientId获取用户角色
     * @return
     */
    List<AuthRole> selectUserRolesByApplicationClientId(Long userId, String clientId);

    /**
     * 角色列表
     * @param roleIds
     * @return
     */
    Map<Long, AuthRole> getByIds(Set<Long> roleIds);

    /**
     * 更新应用下的所有角色的数据权限
     */
    void updateDataPermissionCode(AuthApplication application);

    SubjectAllRoleResult getMyAllRoles();

}
